<template>
  <div class="customer-service-page">
    <div class="page-header">
      <h1>客服中心</h1>
      <p>我们随时为您提供帮助</p>
    </div>
    
    <div class="service-content">
      <div class="service-options">
        <div class="service-card" @click="startChat">
          <div class="card-icon">💬</div>
          <h3>在线客服</h3>
          <p>与客服人员实时对话</p>
        </div>
        
        <div class="service-card" @click="showFAQ">
          <div class="card-icon">❓</div>
          <h3>常见问题</h3>
          <p>查看常见问题解答</p>
        </div>
        
        <div class="service-card" @click="submitTicket">
          <div class="card-icon">📝</div>
          <h3>提交工单</h3>
          <p>提交详细问题描述</p>
        </div>
      </div>
      
      <div class="contact-info">
        <h3>联系方式</h3>
        <div class="contact-item">
          <span class="label">客服热线：</span>
          <span class="value">400-123-4567</span>
        </div>
        <div class="contact-item">
          <span class="label">工作时间：</span>
          <span class="value">周一至周日 9:00-21:00</span>
        </div>
        <div class="contact-item">
          <span class="label">邮箱：</span>
          <span class="value">service@zhinongxiao.com</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'CustomerServicePage',
  methods: {
    startChat() {
      // 跳转到聊天组件或打开聊天窗口
      this.$router.push('/chat')
    },
    showFAQ() {
      // 显示常见问题页面
      this.$router.push('/faq')
    },
    submitTicket() {
      // 跳转到工单提交页面
      this.$router.push('/ticket')
    }
  }
}
</script>

<style scoped>
.customer-service-page {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  color: #2c3e50;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.page-header p {
  color: #7f8c8d;
  font-size: 1.1rem;
}

.service-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.service-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.service-card {
  background: white;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.service-card h3 {
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.service-card p {
  color: #7f8c8d;
  font-size: 0.95rem;
}

.contact-info {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ecf0f1;
}

.contact-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.label {
  color: #7f8c8d;
  font-weight: 500;
}

.value {
  color: #2c3e50;
  font-weight: 600;
}

@media (max-width: 768px) {
  .service-content {
    grid-template-columns: 1fr;
  }
  
  .service-options {
    grid-template-columns: 1fr;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
}
</style>